package com.zhou.base.components.bs.common.exception.base;

import lombok.extern.slf4j.Slf4j;

/**
 * @author xianfeng
 * @date 2023/11/28 18:55
 * @description:
 */
@Slf4j
public class BaseExceptionBuilder {

    public static BaseException message(String message) {
        BaseException bizException = new BaseException();
        bizException.message(message);
        return bizException;
    }

    public static BaseException messageCode(String messageCode) {
        BaseException bizException = new BaseException();
        bizException.messageCode(messageCode);
        return bizException;
    }

    public static BaseException code(Integer code) {
        BaseException bizException = new BaseException();
        bizException.code(code);
        return bizException;
    }

    public static BaseException with(Throwable cause) {
        BaseException bizException = new BaseException(cause);
        return bizException;
    }
}
